#include<iostream>
using namespace std;
int main () {
    int n,  b;
    cin >> n;
    b = n&(-n);
    cout << b << " " << n - b;
    return 0;
}